package org.xxpay.pay.channel.testpay;

import org.springframework.stereotype.Service;
import org.xxpay.core.common.domain.api.msg.AgentPayBalanceRetMsg;
import org.xxpay.core.common.domain.api.msg.QueryRetMsg;
import org.xxpay.core.common.util.MyLog;
import org.xxpay.core.entity.TransOrder;
import org.xxpay.pay.channel.BaseTrans;

/**
 * @author: dingzhiwei
 * @date: 18/07/22
 * @description: 测试代付
 */
@Service
public class TestpayTransService extends BaseTrans {

    private static final MyLog _log = MyLog.getLog(TestpayTransService.class);

    private final static String charset = "UTF-8";

    @Override
    public String getChannelName() {
        return TestpayConfig.CHANNEL_NAME;
    }
    @Override
    public QueryRetMsg trans(TransOrder transOrder) {

        return QueryRetMsg.confirmSuccess(System.currentTimeMillis() + "");
    }

    @Override
    public QueryRetMsg query(TransOrder transOrder) {

        QueryRetMsg retObj = QueryRetMsg.confirmSuccess(System.currentTimeMillis() + "");
        retObj.setChannelOriginResponse("测试通道DATA");
        return retObj;
    }

    @Override
    public AgentPayBalanceRetMsg balance(String payParam) {
        return AgentPayBalanceRetMsg.unsupported();
    }


}
